package solution.T0215_1_Clipboard.command;

import java.time.LocalDateTime;

public abstract class Command {
    private static int idCounter = 0;
    protected final int id;
    protected final LocalDateTime timestamp;

    public Command() {
        this.id = ++idCounter;
        this.timestamp = LocalDateTime.now();
    }

    public abstract void execute();

    public LocalDateTime getTimestamp() {
        return timestamp;
    }

    public int getId() {
        return id;
    }

    public static void resetId() {
        idCounter = 0;
    }
}
